//
//  SNSPostModel.h
//  iBaby365v2
//
//  Created by Kirinrin on 14-7-30.
//  Copyright (c) 2014年 suplus. All rights reserved.
//

#import <Foundation/Foundation.h>

#define kClassId        @"classId"
#define kComments       @"comments"
#define kContent        @"content"
#define kCreateDate     @"createDate"
#define kDbDatetime     @"dbDatetime"
#define kId             @"id"
#define kIsFavorite     @"isFavorite"
#define kIsPlusOne      @"isPlusOne"
#define kKindergartenId @"kindergartenId"
#define kMark           @"mark"
#define kPhoto          @"photo"
#define kPhotoPre       @"photoPre"
#define kPlusOneList    @"plusOneList"
#define kSenderId       @"senderId"
#define kSenderName     @"senderName"
#define kType           @"type"
#define kUserPhoto      @"userPhoto"

#define kNo             @"no"

/**
 *  SNS接口调用使用
 */
typedef NS_ENUM(NSUInteger, SNSWSType)
{
    /**
     *  所有信息
     */
    SNSTypeAll,
    /**
     *  通知提醒
     */
    SNSTypeMessage,
    /**
     *  帖子内容
     */
    SNSTypePost,
};

/**
 *  帖子类型
 */
typedef NS_ENUM(NSUInteger, SNSPostType)
{
    /**
     *  文字
     */
    SNSPostText,
    /**
     *  图片
     */
    SNSPostPhoto,
    /**
     *  声音
     */
    SNSPostVoice,
};


/**
 *  通知提醒种类
 */
typedef NS_ENUM(NSUInteger, SNSMessageType)
{
    /**
     *  通知
     */
    SNSMessageNotice = 1,
    /**
     *  入园离园
     */
    SNSMessageCheckOn,
    /**
     *  评分
     */
    SNSMessageScore,
    /**
     *  聊天，现在通过单独的组件获得
     */
    SNSMessageIM,
    /**
     *  请假
     */
    SNSMessageRest,
    /**
     *  课表
     */
    SNSMEssageSchedule,
    /**
     * 食谱
     */
    SNSMessageCookMenu,
};

@interface SNSPostModel : NSObject

@property(strong, nonatomic)NSString    *classId;
@property(strong, nonatomic)NSArray     *comments;
@property(strong, nonatomic)NSString    *content;
@property(strong, nonatomic)NSDate      *createDate;
@property(strong, nonatomic)NSDate      *dbDatetime;
@property(strong, nonatomic)NSString    *id;
@property(strong, nonatomic)NSNumber    *isFavorite;
@property(assign, nonatomic)BOOL        isPlusOne;
@property(strong, nonatomic)NSString    *kindergartenId;
@property(strong, nonatomic)NSArray     *markList;
@property(strong, nonatomic)NSURL       *photo;
@property(strong, nonatomic)NSURL       *photoPre;
@property(strong, nonatomic)NSArray     *plusOneList;
@property(strong, nonatomic)NSString    *senderId;
@property(strong, nonatomic)NSString    *senderName;
@property(assign, nonatomic)SNSPostType type;
@property(strong, nonatomic)NSURL       *userPhoto;

@property(assign, nonatomic)NSUInteger  no;


+(instancetype)SNSPostWithDictionary:(NSDictionary *)dictionary;

-(instancetype)initWithDictionary:(NSDictionary *)dictionary;

@end



@interface SNSPostCommentModel : NSObject

@property(strong, nonatomic)NSString    *content;
@property(strong, nonatomic)NSDate      *createDate;
@property(strong, nonatomic)NSString    *senderId;
@property(strong, nonatomic)NSString    *senderName;

-(instancetype)initWithDictionary:(NSDictionary *)dictionary;
@end


@interface SNSPlusOneModel : NSObject

@property(strong, nonatomic)NSURL   *photo;

-(instancetype)initWithDictionary:(NSDictionary *)dictionary;
@end


typedef enum SNSMarkDirection:NSUInteger{
    SNSMarkRight,
    SNSMarkLeft,
}SNSMarkDirection;

@interface SNSMarkModel : NSObject
@property (assign, nonatomic)SNSMarkDirection markDirection;
@property (strong, nonatomic)NSString *contentText;
@property (assign, nonatomic)CGPoint pos;

-(instancetype)initWithDictionary:(NSDictionary *)dict;
-(NSDictionary *)toDictionary;
@end